Text-image-layout transformer [tilt]

ABSTRACT

Disclosed herein is a system and method for Natural Language Processing (NLP) of real world documents. the system and method combines various models not previously combined and overcomes the challenges of this combination. Models include an encoder-decoder model, a spatial model, and a multi-modal model.

RELATED APPLICATIONS

This application claims the benefit of U.S. Provisional Patent Application No. 63/150,271, filed Feb. 17, 2021, which is incorporated by reference herein in its entirety.

FIELD OF THE INVENTION

Inventions disclosed and claimed herein are in the field of natural language processing (NLP), and particularly NLP of real-world documents that include tables, figures, forms, and pictures.

BACKGROUND

Most tasks in Natural Language Processing (NLP) can be unified under one framework by casting them as triplets of question, context and answer. We consider such unification of Document Classification, Key Information Extraction and Question Answering in a demanding scenario where context extends beyond the text layer.

This challenge is prevalent in business cases since contracts, forms, applications, and invoices cover a wide selection of document types and complex spatial layouts.

So far, successes achieved in NLP involve models that map raw textual input into raw textual output, which usually are provided in a digital form. An important aspect of real-world oriented problems is the presence of scanned paper records and other analog materials that became digital. As a consequence, there is no easily accessible information regarding the document layout or reading order, and these are to be determined as a part of the process. Furthermore, interpretation of shapes and charts beyond layout may be useful to find the values for some of the requested properties. A system cannot rely solely on text, but requires incorporating information from structure and images.

As shown in FIG. 1, The same document is perceived differently depending on chosen modalities. FIG. 1A focuses on the visual aspect. Schema in FIG. 1B presents spatial relationships between bounding boxes of detected words. Finally, there is an unstructured text of the same excerpt in FIG. 1C, as returned by optical character recognition (OCR) under the detected reading order. Thus, it takes three modalities to solve this fundamental challenge. Extraction of key information from richly formatted documents lies precisely at the intersection of NLP, Computer Vision and Layout Analysis.

TABLE 1 Task Annotation Exact match Layout CoNLL 2003 word-level 100%  − SROIE WikiReading Kleister

  document-level   93% 20% 27% + − +

Sequence labeling models can be trained in all cases where the token-level annotation is available or can be easily obtained. Limitations of this approach are strikingly visible on tasks framed in either key information extraction or property extraction paradigms. Here, no annotated spans are available, but only property-value pairs are assigned to the document. Occasionally, it is expected from the model to mark some particular subsequence of the document.

Referring to Table 1, a comparison of tasks assuming extraction of real-world objects mentioned in the text is shown. Expected values are always present in a substring of a document in Named Entity Recognition, but not elsewhere. However, problems where the expected value is rarely a substring of considered text, are unsolvable assuming sequence labeling methods. As a result, authors applying state-of-the-art entity recognition models are forced to rely on human-made heuristics and time-consuming rule engineering. Particular problems one has to solve when employing a sequence-labeling method can be divided into three groups. We investigate them below to precisely point out the limitations of this approach.

Take an example of the total amount assigned to a receipt in the SROIE dataset. Suppose there is no exact match of expected value in the document, e.g., due to OCR error, incorrect reading order, or different decimal separator used. Unfortunately, a sequence labeling model cannot be applied off-the-shelf, and authors dealing with property extraction rely on either manual annotation or the heuristic-based tagging procedure that impacts the overall end-to-end results. Moreover, when receipts with one item listed are considered, the total amount is equal to a single item price, which is the source of yet another problem. More precisely, if there are multiple matches of the value in the document, it is ambiguous whether to tag all of them, some of them, or none of them.

Another problem one has to solve is to decide how many of the detected entities to return, which of them, and whether to normalize the output somehow. As a consequence, the authors of Kleister proposed a set of handcrafted rules for the final selection of the entity values. These and similar rules are both labour-intensive and prone to errors.

Finally, the property extraction paradigm does not assume the requested value appeared in the article in any form, since it is sufficient for it to be inferable from the content, as in the case of document classification or non-extractive question answering.

These various challenges impose extra conditions beyond NLP.

It would be desirable to have a real-world NLP document processing system that overcomes the stated deficiencies of the prior art.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is an illustration of real-world document data as seen using different prior art modalities.

FIG. 2 is a system diagram of an embodiment of a real-world document processing system as described herein.

FIG. 3 is a diagram illustrating spatial relationships between tokens in a document according to an embodiment.

FIG. 4A is an illustration of prior art Transformer schemes.

FIG. 4B is an illustration of a Transformer scheme according to embodiments described herein.

FIG. 5 is an illustration of a U-NET network according to an embodiment.

DETAILED DESCRIPTION

The challenges and limitations presented by previous approaches to real-world document natural language processing (NLP) are largely overcome by a new architecture as described herein. In an embodiment, layout-aware models are formulated within an encoder-decoder framework. As name entity recognition (NER)-based extraction is disconnected from the final purpose the received data is used for, a typical real-world scenario demands the setting of Key Information Extraction. To address this issue, an embodiment focuses on the applicability of an encoder-decoder model, since it can generate values not included in the input text explicitly, and performs reasonably well on all text-based problems involving natural language. This potentially solves all identified problems of sequence labeling architectures and ties other tasks, such as Question Answering or Text Classification, into the same framework. For example, the model may deduce to answer yes or no depending on the question form only. Its end-to-end elegance and ease of use, allows one to not rely on human-made heuristics and to get rid of time-consuming rule engineering required in the sequence labeling paradigm.

In embodiments, the architecture employs several different models not previously combined, including encoder-decoder, spatial, and multi-modal. One embodiment is based on a Transformer approach, and focuses on inclusion of spatial information or different modalities in text-processing systems, as well as on applicability of encoder-decoder models to Information Extraction and Question Answering.

FIG. 2 is a system diagram of an embodiment of a real-world document processing system 200 as described herein. NLP system 202 in an embodiment is a text-image-layout transformer (TILT). TILT 202 employs models 204, which include an encoder-decoder model, a spatial model, and a multi-modal model. TILT 202 is embodied as a software instructions executed by one or more processors that could reside anywhere.

TILT 206 receives real world data 206 including text data, layout data, and image data electronically via any type of data network 210. TILT 202 also receives questions 208 via data network 210.

TILT generates output 212 which includes key information, document classification and answers to questions 208. As with any electronic data, any of the elements shown in system 200 could physically reside anywhere, and be generated and processed by any type of processor as understood in the art.

Overview of Approaches According to Various Embodiments Spatial-Aware Transformers

When tasks involving 2D documents are considered, sequential models can be outperformed by considering layout information either directly as positional embeddings or indirectly by allowing them to be contextualized on their spatial neighborhood. Further improvements focus on the training and inference aspects by the inclusion of the area masking loss function or achieving independence from sequential order in decoding respectively. In contrast to these previous methods, bias is added to self-attention instead of positional embeddings, and it is generalized to distances on the 2D plane. Additionally, a word-centric masking method concerning both images and text is employed. Moreover, by choosing to use an encoder-decoder, independence from sequential order in decoding is granted without dedicated architectural changes.

Encoder-Decoder for IE and QA

Most NLP tasks can be unified under one framework by casting them as Language Modeling, Sequence Labeling or Question Answering. The QA program of unifying NLP frames all the problems as triplets of question, context and answer or item, property name, and answer. Although this does not necessarily lead to the use of encoder-decoder models, several previous solutions have relied on variants of Transformer architecture. The T5 Transformer is a prominent prior art example of largescale Transformers achieving state-of-the-art results on varied NLP benchmarks. In embodiments, this approach is extended beyond the text-to-text scenario by making it possible to consume a multi-modal input.

Multi-Modal Transformers

Multi-modal transformers attack the relationships between text and other media. In the context of images, this niche was previously approached with an image-to-text cross-attention mechanism or, alternatively, by adding visual features to word embeddings or concatenating them. In contrast to previous approaches, according to embodiment, visual features are added to word embeddings already contextualized on an image's multiple resolution levels.

Model Architecture

In an embodiment, the architecture of a Transformer, initially proposed for the problem of Neural Machine Translation, is a solid base for all generative tasks involving natural language.

Starting from the general view on attention in the first layer of the Transformer. If n denotes the number of input tokens, resulting in a matrix of embeddings X, then self-attention can be seen as:

$\begin{matrix} {{softmax}\mspace{14mu}\left( {\frac{Q_{X}K_{X}^{T}}{\sqrt{n}} + B} \right)V_{X}} & (1) \end{matrix}$

where Q_(X), K_(X) and V_(X) are projections of X onto query, keys and value spaces, whereas B stands for an optional attention bias. There is no B term in the original Transformer, and information about the order of tokens is provided explicitly to the model, i.e.:

X=S+P B=O

where S and P are respectively the semantic embeddings of tokens and positional embedding resulting from their positions. 0_(n)

d denote a zero matrix.

In contrast to the original formulation, we rely on relative attention biases instead of positional embeddings. These are further extended to take into account spatial relationships between tokens, as shown in the document excerpt of FIG. 3, with distinguished vertical buckets for the Amount token.

Model Architecture: Spatial Bias

In an embodiment, the conventional T5 architecture approach is extended to spatial dimensions. Conventional T5 architecture disregards positional embeddings by setting X=S, thus introducing relative bias by extending self-attention's equation with the sequential bias term B=B^(1D), a simplified form of positional signal inclusion. Here, each logit used for computing the attention head weights has some learned scalar added, resulting from corresponding token-to-token offsets. In an embodiment extending this basic approach to spatial dimensions, biases for relative horizontal and vertical distances between each pair of tokens are calculated and added to the original sequential bias:

B=B1D+BH+BV

Such bias falls into one of 32 buckets, which each group being similarly-distanced token pairs. The size of the buckets grows logarithmically, so that greater token pair distances are grouped into larger buckets.

Model Architecture: Contextualized Image Embeddings

In conventional systems, contextualized Word embeddings are expected to capture context-dependent semantics. In light of this fact, for the entire input sequence, an associated sequence of vectors is returned. In an embodiment, contextualized Image embeddings have the same objective, that is, they cover the image region semantics in the context of its entire visual neighborhood. In an embodiment, to produce image embeddings, a convolutional network that consumes the whole page image of size 512×384 is used, and it produces a feature map of 64×48×128. An embodiment uses U-Net as a backbone encoder network since this architecture provides access to not only the information in the near neighborhood of the token, such as font and style, but also to more distant regions of the page, which is useful in cases where the text is related to other structures, e. g, where the text is the description of a picture.

FIG. 5 illustrates a truncated U-Net network

conv

max-pool

up-conv

residual, this multi-scale property emerges from the skip connections within chosen architecture. Then, bounding boxes of each token are used to extract features from U-Net's feature map with ROI pooling.

An image, represented as a matrix of pixels, is processed by a number of convolutional layers Cony combined with max-pooling operations MaxPool to obtain a dense tensor representation of the image. Then, this representation is processed by a combination of up-convolutions UpConv and convolutions Cony with residual connections Residual from corresponding steps. This way representations in higher resolutions are obtained, including the final output of the network representing visual features of the image.

With reference to FIG. 4A. In the original “Vanilla” Transformer 4A1, information about the order of tokens is provided explicitly to the model by positional embeddings added to semantic embeddings. In the T5 architecture, 4A2, sequential bias is introduced, thus separating semantics from sequential distances.

FIG. 4B illustrates an embodiment in which this clear distinction is maintained, but in addition, biases are extended with spatial relationships, and additional image semantics are provided at the input.

An image, represented as a matrix of pixels, is processed by an OCR system to obtain text tokens. The distributional and contextualized semantics of text tokens is embedded into a multidimensional vector space. Text embeddings are added, using the vector-sum operation, to the contextualized visual features obtained directly from the image, each text token is assigned distinct visual features relative to its position and surroundings. The joint embeddings are mapped into queries, keys and values, using learnable linear projections. Queries are matched against keys using dot product. The result of this operation is summed with corresponding attention biases combining linear 1D relations as well as spatial 2D relations; the spatial 2D relations are, in turn, determined using the distances of bounding boxes of each token, as obtained with OCR. The attention biases are determined in a pair-wise manner, for each pair of text tokens. Query-key match summed with attention bias is then used to select the appropriate values. The weighted sum of values is returned as the output of a self-attention head and constitutes a contextualized embedding to be used as the input to the next layer.

The weights and embeddings are learnt in an automatic manner using back-propagation.

Embeddings

In order to inject visual information to the Transformer, a matrix of contextualized image-region embeddings I is added to semantic embedding we define:

X=S+I

in line with the convention from the Model Architecture section above.

Regularization Techniques

In the sequence labeling scenario, each document leads to multiple training instances (token classification), whereas in Transformer sequence-to-sequence models, the same document leads to one training instance with higher feature space (decoding from multiple tokens).

Since most of the tokens are irrelevant in Key Information Extraction and contextualized word embeddings are correlated by design, embodiments overfit more easily than their sequence labeling counterparts. To improve the model's robustness, we introduce a regularization technique for each modality.

Regularization Techniques: Case Augmentation

Subword tokenization, commonly used with Transformer architecture, has several identified disadvantages. For example, it is deterministic while it has been shown that non-deterministic segmentation leads to more robust models due to learning the compositionality of words better. Moreover, pretrained models tend to underperform when text is written with all capitals, since it leads to different segmentation with embeddings of rarely used units. Both of these problems are overcome in an embodiment with a straightforward regularization strategy. Augmented copies of data instances are produced by lower-casing or upper-casing both document and target text simultaneously.

Regularization Techniques: Spatial Bias Augmentation

According to an embodiment, spatial biases are augmented by multiplying the horizontal and vertical distances between tokens by a random factor. Such transformation resembles stretching or squeezing document pages in horizontal and vertical dimensions. Factors used for scaling each dimension are sampled uniformly.

Regularization Techniques: Affine Vision Augmentation

To correct for visual deformations of real-world documents, images are augmented with a affine transformation, preserving parallel lines within an image but modifying its position, angle, size, and shear. When such modifications are performed on the image, the bounding boxes of every text token are updated accordingly. In an embodiment, the exact hyperparameters were subject to an optimization performed on a base model for a DocVQA dataset.

While various inventive embodiments have been described and illustrated herein, those of ordinary skill in the art will readily envision a variety of other means and/or structures for performing the function and/or obtaining the results and/or one or more of the advantages described herein, and each of such variations and/or modifications is deemed to be within the scope of the inventive embodiments described herein. More generally, those skilled in the art will readily appreciate that all parameters, dimensions, materials, and configurations described herein are meant to be exemplary and that the actual parameters, dimensions, materials, and/or configurations will depend upon the specific application or applications for which the inventive teachings is/are used. Those skilled in the art will recognize or be able to ascertain using no more than routine experimentation, many equivalents to the specific inventive embodiments described herein. It is, therefore, to be understood that the foregoing embodiments are presented by way of example only and that, within the scope of the appended claims and equivalents thereto, inventive embodiments may be practiced otherwise than as specifically described and claimed. Inventive embodiments of the present disclosure are directed to each individual feature, system, article, material, kit, and/or method described herein. In addition, any combination of two or more such features, systems, articles, materials, kits, and/or methods, if such features, systems, articles, materials, kits, and/or methods are not mutually inconsistent, is included within the inventive scope of the present disclosure.

The above-described embodiments can be implemented in any of numerous ways. For example, embodiments of designing and making the technology disclosed herein may be implemented using hardware, software or a combination thereof. When implemented in software, the software code can be executed on any suitable processor or collection of processors, whether provided in a single computer or distributed among multiple computers.

Further, it should be appreciated that a computer may be embodied in any of a number of forms, such as a rack-mounted computer, a desktop computer, a laptop computer, or a tablet computer. Additionally, a computer may be embedded in a device not generally regarded as a computer but with suitable processing capabilities, including a Personal Digital Assistant (PDA), a smart phone or any other suitable portable or fixed electronic device.

Also, a computer may have one or more input and output devices. These devices can be used, among other things, to present a user interface. Examples of output devices that can be used to provide a user interface include printers or display screens for visual presentation of output and speakers or other sound generating devices for audible presentation of output. Examples of input devices that can be used for a user interface include keyboards, and pointing devices, such as mice, touch pads, and digitizing tablets. As another example, a computer may receive input information through speech recognition or in other audible format.

Such computers may be interconnected by one or more networks in any suitable form, including a local area network or a wide area network, such as an enterprise network, and intelligent network (IN) or the Internet. Such networks may be based on any suitable technology and may operate according to any suitable protocol and may include wireless networks, wired networks or fiber optic networks.

The various methods or processes outlined herein may be coded as software that is executable on one or more processors that employ any one of a variety of operating systems or platforms. Additionally, such software may be written using any of a number of suitable programming languages and/or programming or scripting tools, and also may be compiled as executable machine language code or intermediate code that is executed on a framework or virtual machine.

In this respect, various inventive concepts may be embodied as a computer readable storage medium (or multiple computer readable storage media) (e.g., a computer memory, one or more floppy discs, compact discs, optical discs, magnetic tapes, flash memories, circuit configurations in Field Programmable Gate Arrays or other semiconductor devices, or other non-transitory medium or tangible computer storage medium) encoded with one or more programs that, when executed on one or more computers or other processors, perform methods that implement the various embodiments of the invention discussed above. The computer readable medium or media can be transportable, such that the program or programs stored thereon can be loaded onto one or more different computers or other processors to implement various aspects of the present invention as discussed above.

The terms “program” or “software” are used herein in a generic sense to refer to any type of computer code or set of computer-executable instructions that can be employed to program a computer or other processor to implement various aspects of embodiments as discussed above. Additionally, it should be appreciated that according to one aspect, one or more computer programs that when executed perform methods of the present invention need not reside on a single computer or processor, but may be distributed in a modular fashion amongst a number of different computers or processors to implement various aspects of the present invention.

Computer-executable instructions may be in many forms, such as program modules, executed by one or more computers or other devices. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform particular tasks or implement particular abstract data types. Typically, the functionality of the program modules may be combined or distributed as desired in various embodiments.

Also, data structures may be stored in computer-readable media in any suitable form. For simplicity of illustration, data structures may be shown to have fields that are related through location in the data structure. Such relationships may likewise be achieved by assigning storage for the fields with locations in a computer-readable medium that convey relationship between the fields. However, any suitable mechanism may be used to establish a relationship between information in fields of a data structure, including through the use of pointers, tags or other mechanisms that establish relationship between data elements.

Also, various inventive concepts may be embodied as one or more methods, of which an example has been provided. The acts performed as part of the method may be ordered in any suitable way. Accordingly, embodiments may be constructed in which acts are performed in an order different than illustrated, which may include performing some acts simultaneously, even though shown as sequential acts in illustrative embodiments.

All definitions, as defined and used herein, should be understood to control over dictionary definitions, definitions in documents incorporated by reference, and/or ordinary meanings of the defined terms.

The indefinite articles “a” and “an,” as used herein in the specification and in the claims, unless clearly indicated to the contrary, should be understood to mean “at least one.”

The phrase “and/or,” as used herein in the specification and in the claims, should be understood to mean “either or both” of the elements so conjoined, i.e., elements that are conjunctively present in some cases and disjunctively present in other cases. Multiple elements listed with “and/or” should be construed in the same fashion, i.e., “one or more” of the elements so conjoined. Other elements may optionally be present other than the elements specifically identified by the “and/or” clause, whether related or unrelated to those elements specifically identified. Thus, as a non-limiting example, a reference to “A and/or B”, when used in conjunction with open-ended language such as “comprising” can refer, in one embodiment, to A only (optionally including elements other than B); in another embodiment, to B only (optionally including elements other than A); in yet another embodiment, to both A and B (optionally including other elements); etc.

As used herein in the specification and in the claims, “or” should be understood to have the same meaning as “and/or” as defined above. For example, when separating items in a list, “or” or “and/or” shall be interpreted as being inclusive, i.e., the inclusion of at least one, but also including more than one, of a number or list of elements, and, optionally, additional unlisted items. Only terms clearly indicated to the contrary, such as “only one of” or “exactly one of,” or, when used in the claims, “consisting of,” will refer to the inclusion of exactly one element of a number or list of elements. In general, the term “or” as used herein shall only be interpreted as indicating exclusive alternatives (i.e., “one or the other but not both”) when preceded by terms of exclusivity, such as “either,” “one of,” “only one of,” or “exactly one of.” “Consisting essentially of,” when used in the claims, shall have its ordinary meaning as used in the field of patent law.

As used herein in the specification and in the claims, the phrase “at least one,” in reference to a list of one or more elements, should be understood to mean at least one element selected from any one or more of the elements in the list of elements, but not necessarily including at least one of each and every element specifically listed within the list of elements and not excluding any combinations of elements in the list of elements. This definition also allows that elements may optionally be present other than the elements specifically identified within the list of elements to which the phrase “at least one” refers, whether related or unrelated to those elements specifically identified. Thus, as a non-limiting example, “at least one of A and B” (or, equivalently, “at least one of A or B,” or, equivalently “at least one of A and/or B”) can refer, in one embodiment, to at least one, optionally including more than one, A, with no B present (and optionally including elements other than B); in another embodiment, to at least one, optionally including more than one, B, with no A present (and optionally including elements other than A); in yet another embodiment, to at least one, optionally including more than one, A, and at least one, optionally including more than one, B (and optionally including other elements); etc.

In the claims, as well as in the specification above, all transitional phrases such as “comprising,” “including,” “carrying,” “having,” “containing,” “involving,” “holding,” “composed of,” and the like are to be understood to be open-ended, i.e., to mean including but not limited to. Only the transitional phrases “consisting of” and “consisting essentially of” shall be closed or semi-closed transitional phrases, respectively, as set forth in the United States Patent Office Manual of Patent Examining Procedures, Section 2111.03. 

What is claimed is:
 1. A system for Natural Language Processing (NLP) of real world documents, the system comprising: a text-image-layout transformer (TILT) natural language processing (NLP) system that is executed on one or more processors, the TILT system comprises executable instructions that when executed by the processor, perform a method, the method comprising, executing one or more models selected from a group comprising, an encoder-decoder model; a spatial model, and; a multi-modal model; receiving data comprising at least text data, layout data, and image data; and operating on the received data to generate a useful output that relates to analysis of the received data.
 2. The system of claim 1, wherein executing the one or more models comprises name entity recognition (NER)-based extraction, and disconnecting name entity recognition (NER)-based extraction from the useful output.
 3. The system of claim 1, wherein the method further comprises receiving one or more questions regarding the received data.
 4. The system of claim 3, wherein the useful output comprises answers to the one or more questions.
 5. The system of claim 3, wherein the useful output comprises key information.
 6. The system of claim 3, wherein the useful output comprises document classification.
 7. The system of claim 1, wherein the spatial model comprises a spatial-aware transformer that employs self-attention and a word-centric masking method that concerns both images and text.
 8. The system of claim 1, wherein the method further comprises extending a T5 transformer to enable consumption of multi-modal input.
 9. The system of claim 1, wherein the multi-modal model comprises adding visual features to word embeddings that are contextualized on multiple resolution levels of an image.
 10. The system of claim 9, wherein the multi-modal model further comprises reliance on relative attention biases.
 11. The system of claim 1, wherein the method further comprises extending a T5 architectural approach to spatial dimensions.
 12. The system of claim 1, wherein the method further comprises generating contextualized image embeddings.
 13. The system of claim 1, wherein the method further comprises spatial bias augmentation.
 14. A method for natural language processing (NLP), the method comprising: one or more processors executing instructions to perform the method, the instructions comprising, receiving a real-world document that comprises at least text data, layout data, and image data; executing one or more models selected from a group comprising, an encoder-decoder model; a spatial model, and; a multi-modal model; and operating on the real-world document to generate a useful output.
 15. The method of claim 14, wherein executing the one or more models comprises name entity recognition (NER)-based extraction, and disconnecting name entity recognition (NER)-based extraction from the useful output.
 16. The method of claim 14, wherein the method further comprises receiving one or more questions regarding the received data.
 17. The method of claim 16, wherein the useful output comprises answers to the one or more questions.
 18. The method of claim 16, wherein the useful output comprises key information.
 19. The method of claim 16, wherein the useful output comprises document classification.
 20. The method of claim 14, wherein the spatial model comprises a spatial-aware transformer that employs self-attention and a word-centric masking method that concerns both images and text.
 21. The method of claim 14, wherein the method further comprises extending a T5 transformer to enable consumption of multi-modal input.
 22. The method of claim 14, wherein the multi-modal model comprises adding visual features to word embeddings that are contextualized on multiple resolution levels of an image.
 23. The method of claim 22, wherein the multi-modal model further comprises reliance on relative attention biases.
 24. The method of claim 14, wherein the method further comprises extending a T5 architectural approach to spatial dimensions.
 25. The method of claim 14, wherein the method further comprises generating contextualized image embeddings.
 26. The method of claim 14, wherein the method further comprises spatial bias augmentation.
 27. A non-transient computer medium having stored therein instructions, which when executed by a processor perform a method, the method comprising: receiving a real-world document that comprises at least text data, layout data, and image data; executing one or more models selected from a group comprising, an encoder-decoder model; a spatial model, and; a multi-modal model; and operating on the real-world document to generate a useful output.
 28. The method of claim 27, wherein executing the one or more models comprises name entity recognition (NER)-based extraction, and disconnecting name entity recognition (NER)-based extraction from the useful output.
 29. The method of claim 27, wherein the method further comprises receiving one or more questions regarding the received data.
 30. The method of claim 29, wherein the useful output comprises answers to the one or more questions. 